<?php
namespace app\api\validate;

use think\Validate;

/**
 * 行为验证器
 * @package app\menus\validate
 * @author
 */
class Project extends Validate
{
    //定义验证规则
    protected $rule = [
        'name'  => 'require',
        'sort'=>'require',
        'price'  => 'require',
        'add_block_price'  => 'require',
        'add_block_time'=>'require',
        'normal_rate'  => 'require',
        'dot_block_rate'  => 'require',
        'add_block_rate'  => 'require',
        'call_block_rate'  => 'require',
        'overtime_queue_rate'  => 'require',
        'overtime_dot_rate'  => 'require',
        'overtime_add_block_rate'  => 'require',
        'receiver_queue_rate'  => 'require',
        'receiver_dot_rate'  => 'require',
        'receiver_add_rate'  => 'require',
        'recommend_rate'  => 'require',
        'time'  => 'require',
        'down_block_time'  => 'require',
        'block_number'  => 'require',
        'is_free_order'  => 'require',
        'is_store_recommend'  => 'require',
        'is_user_show'  => 'require',
        //'description'  => 'require',
//        'gender_can_do'  => 'require',
    ];
    //定义验证提示
    protected $message = [
        'name.require' => '请输入项目名称',
        'sort.require' => '请输入排序号',
        'price.require' => '请输入项目价格',
        //'price.number' => '项目价格为精确两位',
        'add_block_price.require' => '请输入加钟价',
        //'add_block_price.number' => '加钟价为精确两位',
        'add_block_time.require' => '请输入加钟时间',
        'add_block_time.number' => '加钟时间为整数',
        'normal_rate.require' => '请输入标准提成',
        //'normal_rate.number' => '标准提成为精确两位',
        'dot_block_rate.require' => '请输入点钟提成',
        //'dot_block_rate.number' => '点钟提成为精确两位',
        'add_block_rate.require' => '请输入加钟提成',
        //'add_block_rate.number' => '加钟提成为精确两位',
        'call_block_rate.require' => '请输入call钟提成',
        //'call_block_rate.number' => 'call钟提成为精确两位',
        'overtime_queue_rate.require' => '请输入加班排钟提成',
        //'overtime_queue_rate.number' => '加班排钟提成为精确两位',
        'overtime_dot_rate.require' => '请输入加班点钟提成',
        //'overtime_dot_rate.number' => '加班点钟提成为精确两位',
        'overtime_add_block_rate.require' => '请输入加班点钟提成',
        //'overtime_add_block_rate.number' => '加班点钟钟提成为精确两位',
        'receiver_queue_rate.require' => '请输入接待排钟提成',
        //'receiver_queue_rate.number' => '接待排钟提成为精确两位',
        'receiver_dot_rate.require' => '请输入接待点钟提成',
        //'receiver_dot_rate.number' => '接待点钟提成为精确两位',
        'receiver_add_rate.require' => '请输入接待加钟提成',
        //'receiver_add_rate.number' => '接待加钟提成为精确两位',
        'recommend_rate.require' => '请输入技师推荐提成',
        //'recommend_rate.number' => '接待加钟提成为精确两位',
        'time.require' => '请输入服务时长',
        'time.number' => '服务时长为整数',
        'down_block_time.require' => '请输入提前下钟时长',
        'block_number.require' => '请输入计算钟数',
        'is_free_order.require' => '请选择自由排单',
        'is_store_recommend.require' => '请选择店长推荐',
        'is_user_show.require' => '请选择客人端显示',
        //'description.require' => '请输入项目描述',
    ];

}
